### usage: root2histo.sh tt_bbl_todk_mstw8nl_173_173_LHC8_173_j40r5_1M_564546_0_4071.C
### root2hiso.sh takes a single .C files containign ROOT histograms and get all the hisograms out into a text file.

nhisto=`convertTH1 $1 ajjfsdjkfhsdkjfhsjkdfhs  | grep TH1F |  wc -l`
echo $nhisto " histograms will be written"
for i in `seq $nhisto`; do
        echo "converting id"$i
        convertTH1 $1 id$i
done
